package com.yang.common.util;


import com.yang.common.model.StandardReport;
import com.yang.common.model.StandardSubmit;

import java.util.concurrent.ConcurrentHashMap;

/**
 * 用于CMPP状态回调时，临时存储的位置
 */
public class CMPPDeliverMapUtil {

    /**
     * 多线程，所以用ConcurrentHashMap
     */
    private static ConcurrentHashMap<Long, StandardReport> map = new ConcurrentHashMap<>();

    public static void put(Long msgId, StandardReport report){
        map.put(msgId,report);
    }

    public static StandardReport get(Long msgId){
        return map.get(msgId);
    }

    public static StandardReport remove(Long msgId){
        return map.remove(msgId);
    }
}
